//
//  AutoLayoutTableView.m
//  ZYOnlineSchool
//
//  Created by 毕武侠 on 2017/1/5.
//  Copyright © 2017年 bwx. All rights reserved.
//

#import "AutoLayoutTableView.h"
#import "BaseTableViewCell.h"
#import "UITableView+FDTemplateLayoutCell.h"

@implementation AutoLayoutTableView


- (void)initstance {
    [super initstance];
    
    self.estimatedRowHeight = 200;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return [tableView fd_heightForCellWithIdentifier:self.identifier cacheByIndexPath:indexPath configuration:^(BaseTableViewCell *cell) {
        [cell bindModel:self.sourceData[indexPath.row]];
    }];
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
